//
//  ViewController.m
//  UIHomeWork04
//
//  Created by tusm on 16/7/19.
//  Copyright © 2016年 tusm. All rights reserved.
//

#import "ViewController.h"
#import "Masonry.h"
@interface ViewController ()
@property (nullable,nonatomic,strong)UIImageView *imgBackView;
@property (nullable,nonatomic,strong)UIImageView *imgPicView;
@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.
    [self createSubView];
}

- (void)createSubView{
    //背景图片
    _imgBackView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"player_albumblur_default.jpg"]];
    _imgBackView.frame =CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height);
    [self.view addSubview:_imgBackView];
    _imgBackView.userInteractionEnabled = YES;
    
    
    //中间图片
    _imgPicView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"7.jpg"]];
    _imgPicView.frame = CGRectMake(60, 150, 300, 300);
    [_imgBackView addSubview:_imgPicView];
    _imgPicView.clipsToBounds = YES;
    _imgPicView.layer.cornerRadius = 150;

    //歌曲名Label
    UILabel *labelOfSongName = [[UILabel alloc]initWithFrame:CGRectMake(160, 10, 100, 40)];
    [_imgBackView addSubview:labelOfSongName];
    labelOfSongName.text = @"天空之城";
    labelOfSongName.textColor = [UIColor whiteColor];
    labelOfSongName.font = [UIFont systemFontOfSize:20];
    
    //歌手名
    UILabel *labelOfSinger = [[UILabel alloc] initWithFrame:CGRectMake(160, 40, 100, 40)];
    labelOfSinger.text = @"-- 李志 --";
    labelOfSinger.textColor = [UIColor whiteColor];
    [_imgBackView addSubview:labelOfSinger];
    labelOfSinger.font = [UIFont systemFontOfSize:20];
    
    
    //四个小图片
    UIButton *button1 = [UIButton buttonWithType:UIButtonTypeCustom];
    [button1 setImage:[UIImage imageNamed:@"player_btn_bz_sel_normal"] forState:UIControlStateNormal];
//    [button1 setImage:[UIImage imageNamed:@"player_btn_bz_sel_highlight"] forState:UIControlStateHighlighted];
    [_imgBackView addSubview:button1];
    button1.frame = CGRectMake(60, 90, 60, 50);
    button1.showsTouchWhenHighlighted = NO;
    
    
    UIButton *button2 = [UIButton buttonWithType:UIButtonTypeCustom];
    [button2 setImage:[UIImage imageNamed:@"player_btn_copyright_normal"] forState:UIControlStateNormal];
    button2.frame = CGRectMake(120, 90, 60, 50);
    [_imgBackView addSubview:button2];
    
    
    UIButton *button3 = [UIButton buttonWithType:UIButtonTypeCustom];
    [button3 setImage:[UIImage imageNamed:@"player_btn_mv_normal"] forState:UIControlStateNormal];
    button3.frame = CGRectMake(190, 90, 60, 50);
    [_imgBackView addSubview:button3];
    
    
    UIButton *button4 = [UIButton buttonWithType:UIButtonTypeCustom];
    [button4 setImage:[UIImage imageNamed:@"player_btn_dts_on"] forState:UIControlStateNormal];
    button4.frame = CGRectMake(260, 90, 60, 50);
    [_imgBackView addSubview:button4];

    
    //歌词label
    UILabel *labeOfLyrics = [[UILabel alloc] initWithFrame:CGRectMake(130, 470, 200, 40)];
    [_imgBackView addSubview:labeOfLyrics];
    labeOfLyrics.text = @"hdshfkdsfsdknfdsjk";
    labeOfLyrics.textColor = [UIColor whiteColor];
    
    //UIPage
    UIPageControl *pageControl = [[UIPageControl alloc] initWithFrame:CGRectMake(200, 520, 0, 0)];
    pageControl.numberOfPages = 3;
    [_imgBackView addSubview:pageControl];
    
    UISlider *slider = [[UISlider alloc] initWithFrame:CGRectMake(30, 550, self.view.frame.size.width - 60, 30)];
    [self.view addSubview:slider];
    slider.minimumTrackTintColor = [UIColor colorWithRed:0.23 green:0.75 blue:0.49 alpha:1.00];
    slider.thumbTintColor = [UIColor colorWithRed:0.23 green:0.75 blue:0.49 alpha:1.00];
    
    
    //上一首
    UIButton *buttonUp = [UIButton buttonWithType:UIButtonTypeCustom];
    [buttonUp setImage:[UIImage imageNamed:@"player_btn_pre_normal"] forState:UIControlStateNormal];
    buttonUp.frame = CGRectMake(100, 580, 70, 70);
    [_imgBackView addSubview:buttonUp];
    
    UIButton *buttonCenter = [UIButton buttonWithType:UIButtonTypeCustom];
    [buttonCenter setImage:[UIImage imageNamed:@"player_btn_play_normal"] forState:UIControlStateNormal];
    buttonCenter.frame = CGRectMake(180, 580, 70, 70);
    [_imgBackView addSubview:buttonCenter];
    
    
    UIButton *buttonNext = [UIButton buttonWithType:UIButtonTypeCustom];
    [buttonNext setImage:[UIImage imageNamed:@"player_btn_next_normal"] forState:UIControlStateNormal];
    buttonNext.frame = CGRectMake(260, 580, 70, 70);
    [_imgBackView addSubview:buttonNext];
    
    
    
    //最下一行
    UIButton *buttonFavorite = [UIButton buttonWithType:UIButtonTypeCustom];
    [buttonFavorite setImage:[UIImage imageNamed:@"player_btn_favorited_normal"] forState:UIControlStateNormal];
    buttonFavorite.frame = CGRectMake(30, 650, 90, 90);
    [_imgBackView addSubview:buttonFavorite];

    UIButton *buttonXunHuan = [UIButton buttonWithType:UIButtonTypeCustom];
    [buttonXunHuan setImage:[UIImage imageNamed:@"3dtouch_menu_recognize"] forState:UIControlStateNormal];
    buttonXunHuan.frame = CGRectMake(90, 650, 90, 90);
    [_imgBackView addSubview:buttonXunHuan];
    
    
    UIButton *buttonDownLoad = [UIButton buttonWithType:UIButtonTypeCustom];
    [buttonDownLoad setImage:[UIImage imageNamed:@"Unknown"] forState:UIControlStateNormal];
    buttonDownLoad.frame = CGRectMake(150, 650, 90, 90);
    [_imgBackView addSubview:buttonDownLoad];
    
    
    UIButton *buttonShare = [UIButton buttonWithType:UIButtonTypeCustom];
    [buttonShare setImage:[UIImage imageNamed:@"concise_icon_download_normal"] forState:UIControlStateNormal];
    buttonShare.frame = CGRectMake(210, 650, 90, 90);
    [_imgBackView addSubview:buttonShare];
    
    
    UIButton *buttonList = [UIButton buttonWithType:UIButtonTypeCustom];
    [buttonList setImage:[UIImage imageNamed:@"3dtouch_menu_recognize"] forState:UIControlStateNormal];
    buttonList.frame = CGRectMake(270, 650, 90, 90);
    [_imgBackView addSubview:buttonList];


}



















- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end
